From: cl349@firebug.cl.cam.ac.uk Date: Tue, 13 Sep 2005 16:56:02 +0000 (+0000) Subject: IntroduceDomain of dom0 can fail when it's already connected. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~16806^2~36 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=366ca1710bf63719bc7532e3633f1f8e88ab1a3d;p=xen.git IntroduceDomain of dom0 can fail when it's already connected. Signed-off-by: Christian Limpach --- diff --git a/tools/python/xen/xend/XendDomainInfo.py b/tools/python/xen/xend/XendDomainInfo.py index d75d872b5c..77d59e23f1 100644 --- a/tools/python/xen/xend/XendDomainInfo.py +++ b/tools/python/xen/xend/XendDomainInfo.py @@ -27,6 +27,7 @@ import string, re import os import time import threading +import errno import xen.lowlevel.xc; xc = xen.lowlevel.xc.new() from xen.util.ip import check_subnet, get_current_ipgw @@ -1097,7 +1098,14 @@ class XendDomainInfo: ref = xc.init_store(self.store_channel.port2) if ref and ref >= 0: self.setStoreRef(ref) - IntroduceDomain(self.id, ref, self.store_channel.port1, self.path) + try: + IntroduceDomain(self.id, ref, self.store_channel.port1, + self.path) + except RuntimeError, ex: + if ex.args[0] == errno.EISCONN: + pass + else: + raise # get run-time value of vcpus and update store self.exportVCPUSToDB(dom_get(self.id)['vcpus'])